<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/11/16
  Time: 19:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>显示所有图书</title>
</head>
<body>
<h3>显示学生列表</h3>
<form method="post" action="selectstuservlet" enctype="application/x-www-form-urlencoded">
<table border="1" width="90%" align="center">
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>学号</th>
        <th>身份证号</th>
        <th>入学时间</th>
        <th>权限</th>
        <th>操作</th>
    </tr>
    <c:forEach var="stu" items="${stulist}">
        <tr>
            <td>${stu.id}</td>
            <td>${stu.stuname}</td>
            <td>${stu.stuno}</td>
            <td>${stu.idcard}</td>
            <td><fmt:formatDate value="${stu.startdate}" pattern="yyyy-MM-dd"></fmt:formatDate></td>
            <td>${stu.status}</td>
            <td>
                <c:url var="deleteURI" value="deleteStu">
                    <c:param name="id" value="${stu.id}"></c:param>
                </c:url>
                <a href="${deleteURI}" onclick="return confirm('确定要删除吗？')">删除</a>
            </td>
        </tr>
    </c:forEach>
</table>
</form>
</body>
</html>
